Programming with QuickTime VR

| Previous | Chapter contents | Chapter top | Section top | Next |

MyLeavingNodeProc

You can define a routine to respond to a node's being left.

pascal OSErr MyLeavingNodeProc (
                     QTVRInstance qtvr,
                     UInt32 fromNodeID,
                     UInt32 toNodeID,
                     Boolean *cancel,
                     SInt32 refCon);
qtvr
An instance of a QuickTime VR movie.
fromNodeID
The ID of the node being left.
toNodeID
The ID of the node to be entered, or 0 if no node is being entered (because the movie is being closed).
cancel
On entry, a pointer to a Boolean value. Set that value to true to cancel the move from fromNodeID to toNodeID ; otherwise, set that value to false .
refCon
The reference constant specified in the call to QTVRSetLeavingNodeProc that installed this procedure.
function result
A result code.

DESCRIPTION

Your MyLeavingNodeProc procedure is called whenever a node is left, either in response to user actions or in response to QuickTime VR Manager functions that change nodes (such as QTVRGoToNodeID ). Your procedure can do any processing it deems necessary.

Before returning, your procedure should set the Boolean value pointed to by the cancel parameter to false to accept the move from fromNodeID to toNodeID . Set that value to true to cancel the move and to remain at the node specified by the fromNodeID parameter.

SEE ALSO

Use QTVRSetLeavingNodeProc (link) to install a node-leaving procedure. See Listing 2-10 for a sample node-leaving procedure.


© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Section top | Next |